const mongoose = require('mongoose');
let orderSchema = new mongoose.Schema({
    carts:[{
        type: String,
        ref: 'cart'
    }],
    uid:{
        type: String,
        required: true
    },
    addr: {
        type: String,
        required: true
    },
    payStatus:{ // 订单状态 ：{-1: 已过期, 0: 待支付, 1: 已支付[待发货], 2: 已完成}
        type: Number,
        default: 0,
        required: true
    }
});
let Order = mongoose.model('order', orderSchema);
module.exports = Order;
